Method for outputting command by detecting object movement and system thereof

ABSTRACT

The present invention discloses a method for outputting a command by detecting a movement of an object, which includes the following steps. First, an image capturing device captures images generated by the movement of the object at different timings by. Next, a motion trajectory is calculated according to the plurality of images. Further next, a corresponding command is outputted according to the motion trajectory. The present invention also provides a system which employs the above-mentioned method.

CROSS REFERENCE

The present invention claims priority to TW 101115305, filed on Apr. 30,2012.

This is a continuation of a co-pending application Ser. No. 16/702,522filed on Dec. 3, 2019, which is a continuation of application Ser. No.14/715,471 filed on May 18, 2015, which is a continuation of applicationSer. No. 13/865,599, filed on Apr. 18, 2013.

BACKGROUND OF THE INVENTION Field of Invention

The present invention relates to a method and a system for outputting acommand; particularly, it relates to such method and system foroutputting a command by detecting a movement of an object.

Description of Related Art

Currently, for a user to select a function such as a phone number or asoftware application program on a smart phone, a handheld device or adisplay device, the user usually either directly touches the target icondisplayed on the touch screen or selects it with an input device. Forexample, keyboards, mouses or touch panels are typical tools for suchselections in desktop PCs or tablet PCs. Alternatively, a user mayperform selections in a non-contact manner wherein the device sensesgestures of upward, downward, leftward and rightward movements of auser's hand and movement of the user's hand approaching the devicescreen for selecting a function and confirmation.

Generally, if a user wishes to operate a computer in a non-contactmanner to select icons in a menu, the most often used gestures areupward, downward, leftward and rightward movements. However, after auser performs a gesture such as a rightward (leftward) movement, thereis a tendency for the user to move his/her hand back to the centralposition, in particular when the user intends to do another rightward(leftward) movement. Under such circumstance, the device will verylikely misinterpret the gesture as a rightward (leftward) movement andperform a corresponding action which is erroneous, such as moving acursor to an undesired direction and thus causing the user to be unableto select an icon he/she desires.

SUMMARY OF THE INVENTION

The present invention provides a method for outputting a command bydetecting a movement of an object, which can efficiently, accurately andeasily control an electrical device.

The present invention also provides a system for outputting a command bydetecting a movement of an object, which can efficiently, accurately andeasily control an electrical device.

The above and other objectives and advantages of the present inventioncan be understood from the disclosure of the specification.

To achieve the above and other objectives, from one perspective, thepresent invention provides a method for outputting a command bydetecting a movement of an object, the method comprising: capturing aplurality of images generated by the movement of the object at differenttimings by an image capturing device; calculating a motion trajectoryaccording to the images; and outputting the command according to themotion trajectory, which is sent an electrical device so as to execute asoftware application program of the electrical device.

In one embodiment, the step of calculating the motion trajectoryaccording to the plurality of images comprises: subtracting a positionof gravity center of each of the images by a position of gravity centerof a previous image so as to obtain a motion vector at each timeinterval between the image and the previous image; and calculating themotion trajectory according to the motion vectors.

In one embodiment, the step of calculating the motion trajectoryaccording to the motion vectors comprises: generating object rotationinformation according to the motion vectors, wherein the object rotationinformation comprises one or more of a rotation plane normal vector,rotation angle, angular velocity, speed, rotation radius and trajectorylength; and outputting the command to execute a software applicationprogram of an electrical device according to the object rotationinformation.

In one embodiment, the step of executing a software application programof an electrical device according to the object rotation informationcomprises: outputting the command to control a rotation of one or morepredetermined angle units according to the rotation plane normal vectorand the rotation angle. In one embodiment, the predetermined angle unitis adaptively adjusted according to a trajectory velocity or an angularvelocity. In one embodiment, when the object stops rotating, therotation of one or more predetermined angle units is deceleratedaccording to an average speed or average angular velocity of the objectrotation information in a time period before the object stops rotating.

In one embodiment, the step of calculating a motion trajectory accordingto the plurality of images comprises: detecting a change of shape, size,light intensity or position of the object in the images to determinewhether the motion trajectory is a horizontal motion trajectory or avertical motion trajectory.

From another perspective, the present invention provides a system foroutputting a command by detecting a movement of an object, the systemcomprising: an image capturing device for capturing a plurality ofimages generated by the movement of the object at different timings; anda processing unit for receiving the plurality of images and calculatinga motion trajectory according to the plurality of images and outputtingthe command according to the motion trajectory, which is sent anelectrical device so as to execute a software application program of theelectrical device.

In one embodiment, the system further comprises: an invisible lightsource for illuminating the object, wherein the image capturing deviceis for detecting light emitted from the invisible light source.

In one embodiment, the object includes a part of a hand of a user.

In view of the above, the method and system according to the presentinvention for outputting the command by detecting the movement of theobject is capable of operating a menu (such as scrolling and selecting)by a rotation gesture along a plane. For example, the menu is shiftedrightward by two units when the user's hand rotates clockwise by 360degrees two times; the menu is shifted leftward by one unit when theuser's hand rotates counterclockwise by 360 degrees one time. Thus, theuser can input commands by sequential gestures in a space which areunlikely to be misinterprets. Besides, the input of the command byrotation gestures is more efficient, more accurate and easier than theconventional method by upward, downward, leftward and rightwardmovements. Furthermore, the rotation of the object is preferablydetected by calculating the difference among the motion vectors (e.g.,the rotation angle), which is simpler and more effective with respect tothe calculation and implementation, as compared to the conventionalapproach which needs to define a center of rotation from multiplepositions of the object.

The objectives, technical details, features, and effects of the presentinvention will be better understood with regard to the detaileddescription of the embodiments below, with reference to the drawing.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a schematic view showing a system for outputting a command bydetecting a movement of an object according to an embodiment of thepresent invention.

FIG. 2A shows a schematic view of eight images generated by themovements of a user's hand 102 at different timings.

FIG. 2B is a schematic view showing the positions of gravity centers ofthe objects of FIG. 2A at different timings and the motion vectorscorresponding to the movements of the positions of gravity centers ofthe objects.

FIGS. 3A-3C are schematic views showing that an application software isperformed by the object rotation.

FIG. 4 shows that the hand of the user in FIG. 1 is moving in a verticaldirection.

FIG. 5A shows that the vertical movement of the user's hand opens aphonebook menu.

FIGS. 5B-5C are schematic views showing that the user can operate(scroll) the phonebook menu by object rotation.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

The above and other technical details, features and effects of theinvention will be will be better understood with regard to the detaileddescription of the embodiments below, with reference to the drawings. Inthe description, the words relate to directions such as “up”, “down”,“left”, “right”, “forward”, “backward”, etc. are used to illustraterelative orientations in the drawings and should not be considered aslimiting in any way.

FIG. 1 is a schematic view showing a system for outputting a command bydetecting a movement of an object according to an embodiment of thepresent invention. Referring to FIG. 1, the system 100 of thisembodiment comprises an image capturing device 110 and a processing unit120. The image capturing device 110 is capable of capturing imagesgenerated by the movement of an object 102 at different timings. Theimage sensor 110 can be a charge coupled device (CCD), a complementarymetal oxide semiconductor (CMOS) image sensor, or any other devicecapable of detecting light intensity. In this embodiment, an infraredlight source 130 is used for illuminating the object 102, and thereforethe image sensor 110 is an infrared image sensor. Certainly, theabove-mentioned infrared light source and infrared image sensor are forillustrative purpose, but not for limiting the scope of the presentinvention; a user can use any other light source and image sensor. Inthis embodiment of FIG. 1, the object 102 is for example but not limitedto a hand or a part of a hand 102 of the user. The object 102 can alsobe a user with a handheld device or any other part of the user.

Still referring to FIG. 1, the processing unit 120 is capable ofreceiving the images captured by the image sensor 110 which aregenerated by the movement of the user's hand 102, and calculating themotion trajectory 102 a according to the images. Next, the processingunit 120 outputs a command which is sent to an electrical device 140(e.g., the display device of FIG. 1) according to the motion trajectory102 a so as to perform a function such as executing a softwareapplication program of the electrical device 140. (As illustrated later,examples of the function include, but not limited to, dialing a numberon the phonebook by a dialer wheel, or scrolling, selection and controlof the phonebook)

According to this embodiment, the method for outputting a command bydetecting a movement of the object 102 comprises the following steps.First, as shown in FIG. 2A, the image capturing device 110 captures theimages generated by the movement of the user's hand 102 at differenttimings. For the sake of better illustration, FIG. 2A shows eight imagesgenerated by the movement of user's hand 102 at different timings in onefigure. Next, as shown in FIG. 2B which is a schematic view showing thepositions of gravity centers of the objects of FIG. 2A at differenttimings and the motion vectors corresponding to the movements of thepositions of gravity centers of the objects), the gravity center 104 ofthe second image is subtracted by the gravity center 104 of the firstimage to obtain a motion vector V1, and likely for each image to besubtracted by a previous image, so that motion vectors V1-V7 areobtained. Next, the motion trajectory 102 a of the user's hand 102 iscalculated and obtained from the motion vectors V1-V7. In thisembodiment, the gravity center 104 of the object 102 can be calculatedfor example according to the coordinates and light intensities of thepixels in the captured images.

As shown in FIG. 2B, the angles θ1-θ7 between the motion vectors V1-V7and the horizontal plane are different at different timings. If theimages are captured at a fixed frequency, which is usually the case, theangle change at each unit time can be obtained. As such, the motiontrajectory 102 a can also be calculated according to such angle change.Alternatively, the motion trajectory 102 a can be calculated directlyaccording to the motion vectors V1-V7. Thus, this embodiment is able todetect an object rotation according to the motion vectors V1-V7 andgenerate corresponding object rotation information, wherein the objectrotation information for example can include one or more of a rotationplane normal vector, rotation angle, angular velocity, speed, rotationradius and trajectory length. Such object rotation information can beused to perform a function such as executing a software applicationprogram of the electrical device 140.

FIGS. 3A-3C illustrates an example as to how a software applicationprogram of the electrical device 140 is performed according to theobject rotation information.

Referring to FIG. 3A, a telephone dialer program 200 of the electricaldevice 140 displays a dialing wheel 210 and a phonebook 220 on a screenof the electrical device 140. The dialing wheel 210 is operatedaccording to the object rotation information. More specifically, toeffectively control the rotation speed of the dialing wheel 210,preferably, the system 100 outputs the command to control the rotationof the dialing wheel 210 by one or more predetermined angle units, forexample according to the rotation plane normal vector and the rotationangle which are generated by the user's hand 102. For example, a commandof one right-turn unit is outputted when the user's hand 102 rotatesclockwise (the normal direction is −Z) by 180 degrees along the XYplane; a command of two left-turn units are outputted when the user'shand 102 rotates counterclockwise (the normal direction is +Z) by 360degrees along the XY plane. Hence, referring to the process shown inFIGS. 3A-3C, when the user rotates his/her hand 102 counterclockwise by180 degrees, the dialing wheel 210 is rotated by one unit. The number orsymbol falling in a selection area 212 is outputted to a ready-to-dialtelephone number region 213. After the user finishes inputting alldigits of the telephone number, the user can move his/her hand near tothe image capturing device 110 to dial the desired telephone number.Although the position of the object in the image is not changed, theshape, size or light intensity of the object in the image is changed.Therefore, the processing unit 120 can recognize the user's intentionand output a command to dial the desired telephone number. In thisembodiment, the user can also rotate his/her hand 102 clockwise forreverse rotation.

In a preferable embodiment, to control the dialing wheel 210 moresmoothly for better user feeling, the above-mentioned predeterminedangle unit can be adaptively adjusted according to the trajectoryvelocity or the angular velocity. For example, when the user rotateshis/her hand 102 relatively faster, the predetermined angle unit is setrelatively smaller (e.g., a command of four units is outputted when theuser's hand 102 rotates 360 degrees). On the contrary, when the userrotates his/her hand 102 relatively slower, the predetermined angle unitis set relatively larger (e.g., a command of one unit is outputted whenthe user's hand 102 rotates 360 degrees). Likewise, when the user's hand102 stops rotating, the rotation by predetermined angle units can bedecelerated according to the average speed or average angular velocityin a time period before the user's hand 102 stops rotating. In this way,the system 100 can continue outputting the angle (or the command) withan inertia for a time period after the user's hand 102 stops rotating.The above-mentioned time period for example can be determined by therelationship between the average speed (average angular velocity) andthe deceleration (angular deceleration).

FIG. 4 shows that the hand of the user of FIG. 1 moves in verticaldirection. FIG. 5A shows that a phonebook menu is opened after the handof the user moves in vertical direction as shown in FIG. 4. Please referto FIG. 1, FIG. 4, and FIG. 5A. The dialing wheel 210 of the telephonedialer program 200 can be operated by rotating the user's hand 102, butif the user desires to directly select the information stored in thephonebook 220, he/she may move his/her hand 102 along the verticaldirection such that the phonebook list 222 is pulled out (as shown inFIG. 5A). In other words, the phonebook list 222 can be pulled out bydetecting the movement of the object 102 (the user's hand 102) along thevertical direction.

Next, after the phonebook list 222 is opened, the user can rotatehis/her hand 102, and the system 100 can detect the rotation gesture toscroll the list and select a phone number, as shown in FIG. 5B and FIG.5C. Similar to the above, the user can move his/her hand near to theimage capturing device 110 to dial the desired telephone number.Although the position of the object in the image is not changed, theshape, size or light intensity of the object in the image is changed.The processing unit 120 can recognize the user's intention and output acommand to dial the desired telephone number.

In view of the above, the present provides a method and a system foroutputting the command by detecting the movement of the object, whichhave at least the following advantages. First, a menu can be operated bya rotation gesture of a hand along a plane. For example, the menu isshifted rightward by two units when the user's hand rotates clockwise by360 degrees two times; the menu is shifted leftward by one unit when theuser's hand rotates counterclockwise by 360 degrees one time. Thus, theuser can input commands by sequential gestures in a space which areunlikely to be misinterprets. Besides, the input of the command byrotation gestures is more efficient, more accurate and easier than theconventional method by upward, downward, leftward and rightwardmovements. Furthermore, the rotation of the object is preferablydetected by calculating the difference among the motion vectors (e.g.,the rotation angle), which is simpler and more effective with respect tothe calculation and implementation, as compared to the conventionalapproach which needs to define a center of rotation from multiplepositions of the object.

The present invention has been described in considerable detail withreference to certain preferred embodiments thereof. It should beunderstood that the description is for illustrative purpose, not forlimiting the scope of the present invention. For example, the motionvector can be calculated by means other than by the positions of gravitycenters of the objects, such as by other representative points of theobjects. An embodiment or a claim of the present invention does not needto achieve all the objectives or advantages of the present invention.The title and abstract are provided for assisting searches but not forlimiting the scope of the present invention. In view of the foregoing,the spirit of the present invention should cover all such and othermodifications and variations, which should be interpreted to fall withinthe scope of the following claims and their equivalents.

1. A method for outputting a command by detecting a movement of anobject, the method comprising: capturing a plurality of images generatedby the movement of the object by an image capturing device; calculatinga motion trajectory according to the images by an image processor,wherein the motion trajectory includes a rotation; and outputting thecommand according to the motion trajectory to control an action of anelectronic device, wherein the action corresponds to one or morecommands and each command corresponds to a number of predetermined angleunits; wherein different commands are outputted according to differentnumbers of predetermined angle units is generated; and wherein theaction corresponding to one or more commands is triggered by detectingthat the object comes near to the image capturing device.
 2. The methodof claim 1, wherein the step of calculating the motion trajectoryaccording to the plurality of images comprises: subtracting a positionof gravity center of the object in each of the images by a position ofgravity center of the object in a previous image so as to obtain amotion vector corresponding to each image; and calculating the motiontrajectory according to the motion vectors.
 3. The method of claim 2,wherein the step of calculating the motion trajectory according to themotion vectors comprises: generating object rotation informationaccording to the motion vectors, wherein the object rotation informationcomprises one or more of a rotation plane normal vector, rotation angle,angular velocity, speed, rotation radius and trajectory length; andoutputting the command to execute a software application program of anelectrical device according to the object rotation information.
 4. Themethod of claim 3, wherein the step of outputting the command accordingto the object rotation information comprises: outputting the command tocontrol a rotation of one or more predetermined angle units according tothe rotation plane normal vector and the rotation angle.
 5. The methodof claim 4, wherein the predetermined angle unit is adaptively adjustedaccording to a trajectory velocity or an angular velocity.
 6. The methodof claim 1, further comprising: illuminating the object with aninvisible light source, wherein the image capturing device is fordetecting light emitted from the invisible light source.
 7. The methodof claim 1, wherein the step of calculating a motion trajectoryaccording to the plurality of images comprises: detecting a change ofshape, size, light intensity or position of the object in the images todetermine whether the motion trajectory is a horizontal motiontrajectory or a vertical motion trajectory.
 8. The method of claim 1,wherein the object includes a part of a hand of a user.
 9. The method ofclaim 1, wherein when the object stops moving, the action correspondingto one or more commands is decelerated according to a function of aspeed of the object in a time period before the object stops moving.